home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / DTS Sample Code / System 7.0 Samples / MacShell / TextEditControl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-12-04  |  2.9 KB  |  83 lines  |  [TEXT/MPS ]

  1. #ifndef __TEXTEDITCONTROL__
  2. #define __TEXTEDITCONTROL__
  3.  
  4. #ifndef __TYPES__
  5. #include <Types.h>
  6. #endif
  7.  
  8. #ifndef __TEXTEDIT__
  9. #include <TextEdit.h>
  10. #endif
  11.  
  12. #ifndef __WINDOWS__
  13. #include <Windows.h>
  14. #endif
  15.  
  16. typedef struct CTEDataRec {
  17.     short    maxTextLen;
  18.     Boolean    newUndo;
  19.     short    undoSelStart;
  20.     short    undoSelEnd;
  21.     Handle    undoText;
  22.     short    mode;
  23.     Rect    brdrRect;
  24. } CTEDataRec;
  25. typedef CTEDataRec *CTEDataPtr, **CTEDataHndl;
  26.  
  27. pascal void        ASMNOCARET(Rect *caretRect);
  28. pascal Boolean    ASMTECLIKLOOP(void);
  29. void            CTEActivate(Boolean active, TEHandle teHndl);
  30. Boolean            CTEClick(EventRecord *event);
  31. void            CTEClikLoop(void);
  32. void            CTEClipboard(short menuID);
  33. pascal long        CTECtl(short varCode, ControlHandle ctl, short msg, long parm);
  34. ControlHandle    CTECtlHit(void);
  35. void            CTEDispose(TEHandle teHndl);
  36. TEHandle        CTEDisposeView(ControlHandle viewCtl);
  37. short            CTEDocHeight(TEHandle teHndl);
  38. Boolean            CTEEditMenu(Boolean *activeItem, short editMenu, short undoID, short cutID);
  39. Boolean            CTEEvent(EventRecord *event);
  40. void            CTEFakeClick(short newStart, short newEnd, Boolean extend, TEHandle teHndl);
  41. TEHandle        CTEFindActive(WindowPtr window);
  42. Boolean            CTEFindCtl(WindowPtr window, EventRecord *event, TEHandle *teHndl,
  43.                            ControlHandle *ctlHit);
  44. TEHandle        CTEFromScroll(ControlHandle scrollCtl, ControlHandle *retCtl);
  45. void            CTEHide(TEHandle teHndl);
  46. void            CTEIdle(void);
  47. short            CTEKey(EventRecord *event);
  48. void            CTEMove(TEHandle teHndl, short newH, short newV);
  49. void            CTENew(short viewID, WindowPtr window, TEHandle *teHndl, Rect *cRect,
  50.                        Rect *dRect, Rect *vRect, Rect *bRect, short maxTextLen, short mode);
  51. void            CTENewUndo(ControlHandle viewCtl, Boolean alwaysNewUndo);
  52. ControlHandle    CTENext(WindowPtr window, TEHandle *teHndl, ControlHandle ctl);
  53. short            CTENumTextLines(TEHandle teHndl);
  54. short            CTENumViewLines(TEHandle teHndl);
  55. OSErr            CTEPrint(TEHandle teHndl, short *offset, Rect *rct);
  56. Boolean            CTEReadOnly(TEHandle teHndl);
  57. ControlHandle    CTEScrollFromTE(TEHandle teHndl, Boolean vertScroll);
  58. ControlHandle    CTEScrollFromView(ControlHandle viewCtl, Boolean vertScroll);
  59. void            CTESetSelect(short start, short end, TEHandle teHndl);
  60. void            CTEShow(TEHandle teHndl);
  61. void            CTESize(TEHandle teHndl, short dx, short dy, Boolean newDest);
  62. Handle            CTESwapText(TEHandle teHndl, Handle newText, Boolean update);
  63. WindowPtr        CTETargetInfo(TEHandle *teHndl, Rect *teView);
  64. void            CTEUndo(void);
  65. void            CTEUpdate(TEHandle teHndl, ControlHandle ctl, Boolean justShowActive);
  66. ControlHandle    CTEViewFromTE(TEHandle teHndl);
  67. Boolean            CTEWindActivate(WindowPtr window);
  68. Boolean            IsScrollBar(ControlHandle ctl);
  69. void            AdjustTEBottom(TEHandle teHndl);
  70. void            AdjustScrollValues(TEHandle teHndl);
  71.  
  72. #define cteReadWrite        0
  73. #define cteReadOnly            1
  74. #define cteHScroll            2
  75. #define cteHScrollLessGrow    6
  76. #define cteVScroll            8
  77. #define cteVScrollLessGrow    24
  78. #define cteActive            32
  79. #define cteShowActive        64
  80. #define cteTabSelectAll        128
  81.  
  82. #endif __TEXTEDITCONTROL__
  83.